package org.example.design.factory;

import org.example.design.factory.itf.Commodity;

import java.util.HashMap;
import java.util.Map;

/**
 * @Classname Test
 * @Description TODO
 * @Date 2020/10/30 11:56 上午
 * @Created by xiangjd
 */
public class Test {
    public static void main(String[] args) throws Exception {
        StoryFactory storyFactory = new StoryFactory();
        
        //优惠券
        Commodity commodityService = storyFactory.getCommodityService(1);
        commodityService.SendCommidIty("abc1232","123","bbb",null);

        //实物商品
        Commodity commodityService1 = storyFactory.getCommodityService(2);
        Map<String,String> extMap = new HashMap<String,String>();
        extMap.put("consigneeUserName", "谢飞机");
        extMap.put("consigneeUserPhone", "15200292123");
        extMap.put("consigneeUserAddress", "吉林省.长春市.双阳区.XX街道.檀溪苑小区.#18-2109");
        commodityService1.SendCommidIty("10001","9820198721311","1023000020112221113", extMap);

        //电子卡
        Commodity commodityService2 = storyFactory.getCommodityService(3);
        commodityService2.SendCommidIty("10001","AQY1xjkUodl8LO975GdfrYUio",null,null);


    }
}
